package com.ruoyi.camp.api;
import com.github.pagehelper.PageInfo;
import com.ruoyi.camp.domain.CBanner;
import com.ruoyi.camp.service.ICBannerService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(value = "小程序广告查询", tags = {"小程序广告查询"})
@RestController
@RequestMapping("/wechat/banner")
public class WxBannerController extends BaseController {
    @Autowired
    private ICBannerService cBannerService;


    @ApiOperation("小程序广告查询")
    @GetMapping("/list")
    public TableDataInfo list(CBanner cBanner)
    {

        List<CBanner> list = cBannerService.selectCBannerList(cBanner);
        System.out.println(list);
        return getDataTable(list);
    }

}
